Skip to main content

All Questions

4votes
1answer
167views

JSON to CSS in JavaScript

I'm working on a JSON to CSS converter in NodeJS, which takes a .json file and generates a .css file with its utility classes from it. .json example ...
Snr Naldo's user avatar
6votes
1answer
104views

A simple BSON indenter / compacter

BSON is an extended JSON format. For example these documents are valid BSON documents, but invalid JSON documents: prettified documents: ...
felix's user avatar
3votes
1answer
9kviews

Extracting JSON from string using regex

I need to get the value of item inside of this string and parse it as JSON. I've got some working code but I feel like it could be optimized (a lot) and cleaned up (a lot). Any tips or pointers are ...
yourfavorite's user avatar
0votes
1answer
384views

JavaScript to parse json that can be, string, object and array

I have to parse a json object that can be a string, array, array of strings and array of object. I realised that it's not good from the beginning that one object can be many types, but I can't change ...
toy's user avatar
  • 813
1vote
2answers
4kviews

How to handle JSON's undefined value in a better way?

I'm working on Google Book API to post a book's basic information. I notice that some of the books will always miss a value or two under volumeInfo, like this book (...
RedGiant's user avatar
3votes
1answer
478views

JQuery Promise Interface for a (very) simple JSON Parser

I have written a parser function that returns a JQuery Promise. You can see from the code that this is the top level parser and it delegates out to two other more specific parsers. At the minute it ...
JonWells's user avatar
7votes
2answers
11kviews

Parsing JSON with JavaScript

I need to write some JavaScript code that will take a JSON string, parse it, and return the names of the most-deeply nested properties. For example, for this input: ...
Pawel's user avatar

close